﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NLBS.Entity" assembly="NLBS.Entity">
  <class name="Category" table="blog_Category">
    <id name="CategoryID" column="cat_id" type="Int32">
      <generator class="native" />
    </id>
    <property name="Name" column="cat_name"  type="string" length="32" not-null="true" />
    <property name="Order" column="cat_order"  type="Int32" />
    <property name="ArticleCount" column="cat_articleCount"  type="Int32" />
    <property name="Hidden" column="cat_hidden" type="Boolean" />
    <property name="Locked" column="cat_locked" type="Boolean" />
    
    
    <bag name="Articles">
      <key column="log_catID" />
      <one-to-many class="Article"/>
    </bag>

    <!--<set name="SmallArticles" table="blog_Article">
      <key column="log_catID" />
      <composite-element class="Article">
        <property name="Title"/>
      </composite-element>
    </set>-->
  </class>
  
</hibernate-mapping>